//package com.zcyh.exam.service.education;
//
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
//import com.zcyh.exam.constants.EnumConstants;
//import com.zcyh.exam.mapper.education.StudentWrongBookMapper;
//import com.zcyh.exam.model.common.PageInfo;
//import com.zcyh.exam.model.dto.QuestionInfoAnswer;
//import com.zcyh.exam.model.entity.StudentWrongBook;
//import com.zcyh.exam.model.request.PageParam;
//import com.zcyh.exam.model.request.QuestionAnswer;
//import com.zcyh.exam.model.request.WrongBookQuery;
//import com.zcyh.exam.service.BaseService;
//import org.springframework.stereotype.Service;
//
///**
// * 错题本管理
// * @author zengjintao
// * @version 1.0
// * @create_at 2020/11/25 14:24
// */
//@Service
//public class StudentWrongBookService extends BaseService<StudentWrongBookMapper, StudentWrongBook> {
//
//    public StudentWrongBook newStudentWrongBook(String studentId, QuestionAnswer questionAnswer) {
//        StudentWrongBook studentWrongBook = new StudentWrongBook(studentId, questionAnswer.getQuestionInfoId(),
//                questionAnswer.getQuestionMark());
//        studentWrongBook.setStudentAnswer(questionAnswer.getStudentAnswer());
//        studentWrongBook.setCorrectStatus(EnumConstants.CorrectStatus.ERROR.getValue());
//        return studentWrongBook;
//    }
//
//    /**
//     * 错题本列表
//     * @param pageParam
//     * @param wrongBookQuery
//     * @return
//     */
//    public PageInfo<QuestionInfoAnswer> selectPageList(PageParam pageParam, WrongBookQuery wrongBookQuery) {
//        Page<QuestionInfoAnswer> page = new Page<>(pageParam.getPageNumber(), pageParam.getPageSize());
//        return selectPage(baseMapper.selectPageList(page, wrongBookQuery));
//    }
//}
